package com.gxa.usermanagement.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gxa.common.R;
import com.gxa.common.entity.usermange.Dayinji;
import com.gxa.usermanagement.mapper.DaYiJiMapper;
import com.gxa.usermanagement.service.DaYiJiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DaYiJiServiceImpl implements DaYiJiService {

    @Autowired
    private DaYiJiMapper daYiJiMapper;
    @Override
    public R findDaYiJiService(Integer currentPage, Integer pageSize) {
        R r = new R();

        Integer start = (currentPage-1)*pageSize;
        Integer off = pageSize;
        List<Dayinji> daYiJiMapper = this.daYiJiMapper.findDaYiJiMapper(start, off);

        r.setData(daYiJiMapper);
        r.setMessage("查询成功");
        r.setCode(200);
        return r;
    }

}
